#pragma warning(disable:4996)
#include<stdio.h>
#include<stdlib.h>
int main()
{
    FILE* fp;
    char ch;
    fp = fopen("text.txt", "w+");

    if (fp == NULL)
    {
        printf("Open filefailure!");
        exit(1);
    }

    else
    {
        fputc('a', fp);
        rewind(fp);
        fscanf(fp, "%c", &ch);
    }
    printf("%c\n", ch);
    fclose(fp);
    return 0;
}